From c280d5887a30c94e0c1af4b55dce4ba916d1b93b Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 6 Aug 2004 09:46:25 +0000 Subject: [PATCH] Degrade gracefully: disable PHPTal-based skins on PHP 5.0 or higher. Notify the user about this at setup time. --- config/index.php | 11 ++++++++++- includes/DefaultSettings.php | 4 +++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/config/index.php b/config/index.php index e6fb49cf68..f72d4dc83b 100644 --- a/config/index.php +++ b/config/index.php @@ -189,7 +189,16 @@ $wgConfiguring = true; $conf = new ConfigData; install_version_checks(); -print "
  • PHP " . phpversion() . " ok
  • \n"; + +print "
  • PHP " . phpversion() . ": "; +if( version_compare( phpversion(), "5.0", "lt" ) ) { + print "ok"; +} else { + print " the MonoBook skin will be disabled due to an incompatibility + between the PHPTAL template library and PHP 5. The wiki should + function normally, but with the older look and feel."; +} +print "
  • \n"; if( ini_get( "safe_mode" ) ) { ?> diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index bdfd2642f7..bd10946f8e 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -351,7 +351,9 @@ $wgImageMagickConvertCommand = '/usr/bin/convert'; # PHPTal is a library for page templates. MediaWiki includes # a recent PHPTal distribution. It is required to use the # Monobook (default) skin. -$wgUsePHPTal = true; +# +# Currently it does not work on PHP5. +$wgUsePHPTal = version_compare( phpversion(), "5.0", "lt" ); if( !isset( $wgCommandLineMode ) ) { $wgCommandLineMode = false; -- 2.20.1